import Vue from 'vue'
import App from './App'

import store from '@/store'

import uView from 'uview-ui' // 引入全局uView
// const vuexStore = require('@/store/$u.mixin.js') // 引入uView提供的对vuex的简写法文件
import defaultConfig from '@/config/config'
import vtool from '@/utils/index'
import jwx from '@/utils/jwx.js'
import { upload } from '@/api/common/file'

Vue.use(uView)
// uni.$u.config.unit = 'rpx'
// Vue.mixin(vuexStore)

// 注册全局组件
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
// Vue.component('mescroll-body', MescrollBody)
// Vue.component('mescroll-uni', MescrollUni)

Vue.prototype.$dy_config = defaultConfig
Vue.prototype.$dy_tool = vtool
Vue.prototype.$jwx = jwx
Vue.prototype.$dy_upload = upload

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
  store,
  ...App
})

// 引入请求封装
require('./util/request/index')(app)


// http接口API集中管理引入部分
import httpApi from '@/api/http.api.js'
Vue.use(httpApi, app)

app.$mount()
